package com.itheimai02;

import java.math.BigDecimal;
import java.util.TreeSet;

public class Work07 {
    public static void main(String[] args) {
        String  str  = "90 -7 0 18 2 0 2 2 45 4";
        String[] s = str.split(" ");
        TreeSet<Integer> ts =  new TreeSet<>((o1,o2)->{
            int  num = o2 - o1;
            num=num==0?1:num;
            return num;

        });
        for (int i = 0; i < s.length; i++) {
            BigDecimal bd = new BigDecimal(s[i]);
            int i1 = bd.intValue();
            ts.add(i1);
        }
        for (Integer t : ts) {
            System.out.println(t);
        }
    }
}
